package com.bsoft.gol.hcs.specialist.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * 病种配置数据采集实体
 *
 * @author niule
 */
@Entity
@Table(name = "fus_disease_collect_config")
public class DiseaseCollectConfigEntity {
    private Long collectId;
    private Long diseaseTypeId;
    private String collectClass;
    private String collectCondition;
    private String collectValue;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh_CN", timezone = "GMT+8")
    private Date createTime;

    @Id
    @Column(name = "collect_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Long getCollectId() {
        return collectId;
    }

    public void setCollectId(Long collectId) {
        this.collectId = collectId;
    }

    @Basic
    @Column(name = "disease_type_id")
    public Long getDiseaseTypeId() {
        return diseaseTypeId;
    }

    public void setDiseaseTypeId(Long diseaseTypeId) {
        this.diseaseTypeId = diseaseTypeId;
    }

    @Basic
    @Column(name = "collect_class")
    public String getCollectClass() {
        return collectClass;
    }

    public void setCollectClass(String collectClass) {
        this.collectClass = collectClass;
    }

    @Basic
    @Column(name = "collect_condition")
    public String getCollectCondition() {
        return collectCondition;
    }

    public void setCollectCondition(String collectCondition) {
        this.collectCondition = collectCondition;
    }

    @Basic
    @Column(name = "collect_value")
    public String getCollectValue() {
        return collectValue;
    }

    public void setCollectValue(String collectValue) {
        this.collectValue = collectValue;
    }

    @Basic
    @Column(name = "createTime")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        DiseaseCollectConfigEntity that = (DiseaseCollectConfigEntity) o;
        return collectId.equals(that.collectId) &&
                Objects.equals(diseaseTypeId, that.diseaseTypeId) &&
                Objects.equals(collectClass, that.collectClass) &&
                Objects.equals(collectCondition, that.collectCondition) &&
                Objects.equals(collectValue, that.collectValue) &&
                Objects.equals(createTime, that.createTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(collectId, diseaseTypeId, collectClass, collectCondition, collectValue, createTime);
    }
}
